import Vue from 'vue'
import VueRouter from 'vue-router'
// import Home from '../views/home/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect:'/home/pei'
  },
  {
    path: '/home',
    name: 'Home',
    component: () => import(/* webpackChunkName: "home" */ '../views/home/Home.vue'),
    children:[{
      path: '/home/pei',
      name: 'Pei',
      component: () => import(/* webpackChunkName: "pei" */ '../views/home/pei/index.vue'),
    },{
      path: '/home/classfin',
      name: 'Classfin',
      component: () => import(/* webpackChunkName: "classfin" */ '../views/home/classfin/index.vue'),
    },{
      path: '/home/hui',
      name: 'Hui',
      component: () => import(/* webpackChunkName: "hui" */ '../views/home/hui/index.vue'),
    },{
      path: '/home/car',
      name: 'Car',
      component: () => import(/* webpackChunkName: "pei" */ '../views/home/car/index.vue'),
    },{
      path: '/home/my',
      name: 'My',
      component: () => import(/* webpackChunkName: "my" */ '../views/home/my/index.vue'),
    },]
  },
  {
    path: '/about',
    name: 'About',
    component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  },
  {
    path:'/aduress',
    name:'Aduress',
    component: () => import(/* webpackChunkName: "Aduress" */ '../views/Aduress.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
